﻿using System.ComponentModel;
using System.Drawing;
using System.Drawing.Design;
using System.Windows.Forms;

namespace WenSkin.Controls
{
    public class WenLable : WenControl
    {
        public WenLable() : base()
        {
        }

        #region 公有属性

        [Category("Wen"), Description("显示文字内容")]
        [Editor(typeof(Design.Editor.TextEditFormUITypeEditor), typeof(UITypeEditor))]
        public override string Text { get => base.Text; set { base.Text = value; this.Invalidate(); } }

        #endregion

        protected override void WenOnPaint(Graphics g, Rectangle rec, PaintEventArgs e)
        {
            base.WenOnPaint(g, rec, e);
            this.DrawString(this.Text, g, rec);
        }
    }
}
